5

1

RAG Workshop - Put It All Together

Estimated time: 60 minutes

by Kevin Lin, Andreas Mueller

2

Task: Run the Frontend App

  • Locate the pre-built frontend code in the /frontend folder.
  • The frontend is built using Angular.
3

Task: Run the Frontend App

Install the necessary software

  • Install the necessary software:
    • Node.js
    • npm (Node Package Manager)
    • Angular CLI
  • These tools are needed to run the Angular app.
4

Task: Run the Frontend App

Running the Frontend App

  • Start the Angular app:
  • Run the following commands to install dependencies and start the app:
  • Check the app in your browser at:

http://localhost:4200/

npm install # Or equivalent package manager command
npm start
5

Task: Integrate Frontend with Backend

  • The frontend is pre-configured to communicate with the backend listening on:

http://localhost:8000

  • Check the proxy settings in proxy.conf.json to ensure proper routing.
6

Task: Integrate Frontend with Backend

Test the ChatBot

  • Ask any questions related to the insurance policy in the chat window
  • Use the debug console to check the HTTP requests and responses.
7

Task: Integrate Frontend with Backend

Troubleshooting Integration Issues

  • Ensure that the backend server is running.
  • Verify proxy settings in proxy.conf.json if requests fail.
  • Checking the console logs for errors can provide additional insights.
8

🏆 Bonus Task: Improve Chat Experience

Task: Context-Aware Chat and Streaming Responses

  • Make the RAG application context-aware by including past chat conversations in the LLM prompt.
9

🏆 Bonus Task: Collect User Feedback on Responses

Collect User Feedback

  • Implement simple controls like Thumb Up or Thumb Down for users to rate the chatbot's response.
  • Feedback will help evaluate the quality of each response.

Incorporate Feedback

  • Think of ways to use feedback data to improve response quality.
  • Example approaches:
    • Analyze negative feedback and adjust the retrieval or generation process.
    • Use positive feedback to reinforce successful response patterns.
10

🏆 Bonus Task: Switching to Streaming Responses

  • Switch to a streaming approach to make responses feel more interactive and improve user experience.
  • This allows the user to see the response as it is generated, rather than waiting for the entire answer.
11